﻿<%@ Page Language="C#" AutoEventWireup="true"  %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.IsAuthenticated)
            Response.Redirect("~/Default.aspx");        
    }
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>企业社会责任管理系统 v 2011.1.0</title>
    <link href="Styles/Src/base.css" rel="stylesheet" type="text/css" />
    <link href="Styles/Src/page.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="Scripts/Src/core.js" type="text/javascript"></script>
</head>
<body scroll="no" style="overflow: hidden;">
    <div id="loginForm">
        <div class="title">
            企业社会责任管理系统 <span>v 2011.1.0</span>
        </div>
        <table id="login" class="x-form">
            <tbody>
                <tr>
                    <td>用户名:</td>
                    <td><input type="text" id="txtUsername" /></td>
                </tr>
                <tr>
                    <td>密码:</td>
                    <td><input type="password" id="txtPassword" /></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td><a href="javascript:void(0);" id="loginButton"></a></td>
                </tr>
            </tbody>
        </table>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#loginButton').click(function () {
                var uid = $('#txtUsername').val();
                var pwd = $('#txtPassword').val();

                if ($.trim(uid).length == 0 || $.trim(pwd).length == 0) {
                    alert('用户名或者密码输入有误！');
                    $('#txtUsername').val($.trim(uid));
                    $('#txtPassword').val($.trim(pwd));
                    return;
                }

                Ecrms.login({
                    username: uid,
                    password: pwd
                });
            });
        });
    </script>
</body>
</html>
